using System;
using System.Collections.Generic;
using System.Text;

using Mono.Cecil;

using CILDiffLibPrime.Collectors;

namespace CILDiffLibPrime
{
    public class DiffServices
    {
        // Get changed relationships.
        public ChangePairCollector GetChangePairs(AssemblyDefinition a, AssemblyDefinition b)
        {
            ChangePairCollector pairs = new ChangePairCollector();
            Visit v = new Visit();
            v.RegisterCollector(pairs, "pairs");
            v.Compare(a, b);
            return pairs;
        }

        // Persist the assembly for changes.
        public void GetMergedDifference(string fileA, string fileB)
        {
            
        }

        public void GetMergedDifference(AssemblyDefinition a, AssemblyDefinition b)
        {
            PackageBinary package = new PackageBinary();

            Visit v = new Visit();
            v.Compare(a, b);
            
            //string name = m_merge.Name.Name + "_diff" + (m_merge.Kind == AssemblyKind.Dll ? ".dll" : ".exe");
            //AssemblyFactory.SaveAssembly(m_merge, name);
        }


        // Assemblies, Namespaces, Classes, Methods
        public void GetChangedCodeElements()
        {
        }

        // For simple print out.
        public void GetChangeSummary()
        {
        }
    }
}